//
//  ViewController.m
//  PullLeftToRefreshDemo
//
//  Created by zhou Can on 15/6/2.
//  Copyright (c) 2015年 zhou Can. All rights reserved.
//

#import "ViewController.h"
#import "BannerScrollView.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    [self setEdgesForExtendedLayout:UIRectEdgeNone];
    
    BannerScrollView *scrollView = [[BannerScrollView alloc] initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.view.bounds), 300) withItems:@[@(1),@(2),@(3)]];
    [scrollView setPagingEnabled:YES];
    [scrollView setNeedRefresh:^{
        UIViewController *vc = [[UIViewController alloc] init];
        vc.view.backgroundColor = [UIColor orangeColor];
        [self.navigationController pushViewController:vc animated:YES];
    }];
    [self.view addSubview:scrollView];
    
}




- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
